
import request from '@/utils/request'
// 后台-订单tab实时统计
export function apiOrderBIndicator(data) {
    return request({
        method: 'get',
        url: '/order/b/indicator',
        params: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 查询微信支付状态
export function apiGetPaymentStatusByOrderCode(data) {
    return request({
        method: 'post',
        url: '/paymentInfo/getPaymentStatusByOrderCode',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 订单列表
export function apiOrderBList(data) {
    return request({
        method: 'post',
        url: '/order/b/list',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 订单导出
export function apiOrderBExport(data) {
    return request({
        method: 'post',
        url: '/order/b/export',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 订单详情
export function apiOrderBDetail(data) {
    return request({
        method: 'post',
        url: '/order/b/detail',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 后台-取消订单
export function apiOrderBCancelOrder(data) {
    return request({
        method: 'post',
        url: '/order/b/cancelOrder',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 后台-派单
export function apiOrderBSendOrder(data) {
    return request({
        method: 'post',
        url: '/order/b/sendOrder',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 后台-退款关闭订单
export function apiOrderBRefundClose(data) {
    return request({
        method: 'post',
        url: '/order/b/refundClose',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 后台-同步服务商
export function apiOrderBSynchronous(data) {
    return request({
        method: 'post',
        url: '/order/b/synchronous',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 后台-关闭加价单
export function apiOrderBCloseRaise(data) {
    return request({
        method: 'post',
        url: '/order/b/closeRaise',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}


// 后台-服务评价
export function apiOrderBEvaluate(data) {
    return request({
        method: 'post',
        url: '/order/b/evaluate',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 后台-关闭加价单
export function apiExtraServiceOrderBCloseRaise(data) {
    return request({
        method: 'post',
        url: '/extraServiceOrder/b/closeRaise',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 服务下单
export function apiOrderBCreateOrder(data) {
    return request({
        method: 'post',
        url: '/order/b/createOrder',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 平台代下单
export function apiOrderBCreateOrderForAnother(data) {
    return request({
        method: 'post',
        url: '/order/b/createOrderForAnother',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 后台-订单列表每个状态对应的订单数
export function apiOrderBStatusCount(data) {
    return request({
        method: 'post',
        url: '/order/b/statusCount',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 创建加价单
export function apiExtraServiceOrderCreate(data) {
    return request({
        method: 'post',
        url: '/extraServiceOrder/create',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 创建订单获取支付参数
export function apiOrderBGetPay(data) {
    return request({
        method: 'post',
        url: '/order/b/getPay',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 创建加价订单获取支付参数
export function apiExtraServiceOrderGetPay(data) {
    return request({
        method: 'post',
        url: '/extraServiceOrder/getPay',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 计算订单价格
export function apiServiceQuotationGetServiceQuotation(data) {
    return request({
        method: 'post',
        url: '/serviceQuotation/getServiceQuotationByCategoryTypeAndAddress',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 获取同步订单得服务商列表
export function apiSaasServiceBCanReceive(data) {
    return request({
        method: 'post',
        url: '/saasService/b/canReceive',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 退款原因
export function apiDictRefundCloseReason(data) {
    return request({
        method: 'get',
        url: '/system/dict/data/type/refund_close_reason',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 加价原因
export function apiDictAddPriceReason(data) {
    return request({
        method: 'get',
        url: '/system/dict/data/type/add_price_reason',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 售后原因
export function apiDictSaleType(data) {
    return request({
        method: 'get',
        url: '/system/dict/data/type/sale_type',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 后台评价设置
export function apiDictOrderEvaluate(data) {
    return request({
        method: 'get',
        url: '/system/dict/data/type/order_evaluate',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 后台-验收完成
export function apiOrderBFinish(data) {
    return request({
        method: 'post',
        url: '/order/b/finish',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
export function apiOrderBUpdateStatus(data) {
    return request({
        method: 'post',
        url: '/order/b/updateStatus',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}